<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap">

    <div class="row">
        <div style="background: #ffffff;">

            <form class="form-horizontal" name="addSCGForm" novalidate>
                <div class="panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><strong>新增章节信息</strong></h3>
                        <!--<ul class="panel-controls">-->
                        <!--<li><a href="javascript:void(0)" class="panel-remove"><span class="fa fa-times"></span></a></li>-->
                        <!--</ul>-->
                    </div>
                    <div class="panel-body panel-dialog">
                        <p>请按照提示输入新增章节的各项信息。</p>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">章节图片</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="profile-image">
                                    <img style="min-height: 50px;min-width: 50px;max-width: 100px;max-height: 100px;" ng-src="{{newClassGroup.picture | faceUrl}}" ngf-select ngf-change="uploadImage($files)" ngf-pattern="'image/*'"
                                         ngf-accept="'image/*'" ngf-max-size="20MB" ngf-min-height="100" ngf-resize="{width: 1000, height: 1000}" style="cursor: pointer"/>
                                </div>
                                <span class="help-block">{{'请上传图片' | dyLanguage}}<i style="cursor: pointer; "><span ng-show="showPictureProgress">({{pictureProgress.value}}%)</span></i></span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">名称</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" name="name" ng-model="newClassGroup.name" required/>
                                </div>
                                <span class="help-block" ng-show="(addSCGForm.name.$untouched && !addSCGForm.$submitted) || addSCGForm.name.$valid">请输入章节的名称</span>
                                <div ng-show="(addSCGForm.name.$touched || addSCGForm.$submitted ) && addSCGForm.name.$invalid">
                                    <span class="error-block" ng-show="addSCGForm.name.$error.required">必须要输入章节的名称</span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">编码</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" name="code" ng-model="newClassGroup.code"/>
                                </div>
                                <span class="help-block" ng-show="(addSCGForm.code.$untouched && !addSCGForm.$submitted) || addSCGForm.code.$valid">请输入章节的编码</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">序号</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" name="sort" ng-model="newClassGroup.sort" required ng-pattern="/^[1-9]\d*$/"/>
                                </div>
                                <span class="help-block" ng-show="(addSCGForm.sort.$untouched && !addSCGForm.$submitted) || addSCGForm.sort.$valid">请输入章节的序号</span>
                                <div ng-show="(addSCGForm.sort.$touched || addSCGForm.$submitted ) && addSCGForm.sort.$invalid">
                                    <span class="error-block" ng-show="addSCGForm.sort.$error.required">必须要输入章节的序号</span>
                                    <span class="error-block" ng-show="addSCGForm.sort.$error.pattern">必须是大于零的整数</span>
                                </div>
                            </div>
                        </div>

                        <!--<div class="form-group">-->
                        <!--<label class="col-md-3 col-xs-12 control-label">是否免费</label>-->
                        <!--<div class="col-md-6 col-xs-12" >-->
                        <!--<input type="checkbox" style="width: 20px;height: 20px;" ng-model="newClassGroup.isFree"/>-->
                        <!--<span class="help-block">该章节是否免费</span>-->
                        <!--</div>-->
                        <!--</div>-->

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">描述</label>
                            <div class="col-md-6 col-xs-12">
                                <textarea class="form-control" rows="5" ng-model="newClassGroup.remark"></textarea>
                                <span class="help-block">请输入章节的描述</span>
                            </div>
                        </div>

                    </div>
                    <div class="panel-footer" style="text-align: center;">
                        <button class="btn btn-danger" ng-click="cancel()"><i class="fa fa-times"></i>取消</button>
                        <button class="btn btn-info" ng-click="submit()"><i class="fa fa-check"></i>确定</button>
                    </div>
                </div>
            </form>

        </div>
    </div>

</div>
<!-- END PAGE CONTENT WRAPPER -->